package com.leo.foodmaster.admin.stock.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leo.foodmaster.admin.stock.entity.Warehouse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.leo.foodmaster.commons.entity.Result;

/**
 * <p>
 * 仓库管理 服务类
 * </p>
 *
 * @author Leo
 * @since 2021-08-15
 */
public interface IWarehouseService extends IService<Warehouse> {

    /**
     * 条件分页查询仓库列表
     * @param page 分页参数
     * @param name 仓库名称
     * @param status  仓库状态
     * @return IPage<Warehouse>
     */
    IPage<Warehouse> getWarehousePageList(Page<Warehouse> page, String name, String status);

    /**
     * 新增仓库
     * @param warehouse 仓库信息
     * @return Result<Object>
     */
    Result<Object> addWarehouse(Warehouse warehouse);

    /**
     * 修改仓库
     * @param warehouse 仓库信息
     * @return Result<Object>
     */
    Result<Object> updateWarehouse(Warehouse warehouse);
}
